package com.ruoyi.common.common;

public enum CommonEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS("200", "成功!"),
    BODY_NOT_MATCH("400", "请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401", "请求的数字签名不匹配!"),
    NOT_FOUND("404", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    SERVER_BUSY("503", "服务器正忙，请稍后再试!"),


    //业务操作
    //管理员
    IMAGE_CODE_ERROR("100001", "获取验证码失败"),

    REGISTER_PARAM_ERROR("100002", "参数缺失"),
    REGISTER_IMAGE_CODE_ERROR("100003", "图片验证码错误"),
    REGISTER_NIKE_EXIST_ERROR("100004", "用户名已经存在"),

    LOGIN_NIKE_NOT_EXIST_ERROR("100006", "用户名不存在"),
    LOGIN_PASSWORD_ERROR("100007", "密码错误"),
    LOGIN__NIKE_PASSWORD_ERROR("100008", "密码错误"),
    LOGIN_PHONE_ERROR("100009", "手机号还未注册"),
    LOGIN_SMS_ERROR("100010", "验证码不正确"),
    LOGIN_SMS_CODE_ERROR("100011", "获取短信验证码失败"),
    LOGIN_ERROR("100011", "获取短信验证码失败"),
    LOGIN_PHONE_NOT_MATCH_ERROR("100012","用户手机号不匹配"),
    REGISTER_ERROR("100013","注册失败"),

    // 留言相关
    CUSTOMER_ADD_ERROR("200001","留言添加失败") ,
    CUSTOMER_COMMIT_REPEAT_ERROR("200002","留言已经提交过") ,
    CUSTOMER_DEAL_ERROR("200003","留言处理失败") ,
    CUSTOMER_DEAL_PARAM_ERROR("200004","留言参数异常，处理失败") ,
    CUSTOMER_NOT_EXIST_ERROR("200005","留言参数异常，处理失败") ,
    CUSTOMER_NOT_REPEAT_ERROR("200006","请勿重复操作") ,

    // 浏览记录
    VISIT_ADD_ERROR("300001","浏览记录添加失败") ,

    // 发布采购单相关
    PUBLISH_ADDRESS_EMPTY("400001","地址不能为空"),
    PUBLISH_NAME_EMPTY("400002","联系人不能为空"),
    PUBLISH_PHONE_EMPTY("400003","联系人电话不能为空"),
    PUBLISH_PRICE_EMPTY("400004","价格不能为空"),
    PUBLISH_NUM_EMPTY("400005","数量不能为空"),
    PUBLISH_ADD_ERROR("400006","采购信息发布失败"),
    PUBLISH_PRODUCT_NAME_EMPTY("400007","商品名称不能为空"),
    PUBLISH_CATEGORYE_EMPTY("400008","产品类目不能为空"),
    PUBLISH_STATUS_ERROR("400009","修改的状态不正确"),
    PUBLISH_NOT_EXIST_ERROR("400010","修改的状态不正确"),
    PUBLISH_EDIT_ERROR("400011","编辑采购信息失败，请稍后重试"),
    PUBLISH_MUST_ONE_ERROR("400012","编辑管理员需与发布时的管理员为同一个"),
    PUBLISH_MUST_LARGE_ERROR("400013","可购买个数不能小于已经购买个数"),
    PUBLISH_MUST_OVER_NUM_ERROR("400014","购买超出最大限制"),
    PUBLISH_BUY_ERROR("400015","购买失败"),
    PUBLISH_BUY_FINAL_ERROR("400016","已购买完毕，无需购买"),
    PUBLISH_FORBIDDEN_ERROR("400017","该采购信息已经禁用！"),
    PUBLISH_FILL_EMPTY_ERROR("400018","不能上传空文件！"),
    PUBLISH_FILL_UPLOAD_ERROR("400018","上传文件失败！"),
    PUBLISH_NOT_EIXST_ERROR("400019","采购单不存在！"),


    // 用户相关
    USER_UPDATE_PARAM_ERROR("500001","缺少必填参数"),
    USER_NOT_EXIST_ERROR("500002","用户不存在"),
    USER_UPDATE_ERROR("500003","用户资料更新失败"),
    USER_BUY_VIP_ERROR("500004","购买会员失败"),
    USER_CATEGORY_ADD_ERROR("500005","用户关注类别保存失败"),
    USER_CATEGORY_FIND_ERROR("500006","查询不到用户关注的该类目"),
    USER_CATEGORY_DELETE_ERROR("500007","删除用户类目关系失败"),
    USER_EXIST_ERROR("500008","用户已存在"),
    USER_STATUS_ERROR("500009","用户状态不对"),
    USER_BALANCE_EMPTY_ERROR("500010","账户余额不足，请充值后再进行下单"),

    RECHARGE_ERROR("600001","充值失败"),

    RECHARGE_ACTIVITY_GIVE_ERROR("600002","活动赠送金额不能为0"),
    RECHARGE_ACTIVITY_MONEY_ERROR("600003","活动充值金额不能为0"),
    RECHARGE_ACTIVITY_NAME_ERROR("600004","活动名称不能为空"),
    RECHARGE_ACTIVITY_TIME_ERROR("600005","活动时间不能为空"),
    RECHARGE_ACTIVITY_TIME_INVILD_ERROR("600006","活动结束时间不能早于当前时间"),
    RECHARGE_ACTIVITY_SAVE_ERROR("600007","活动保存失败"),

    ;


     ;
    /**
     * 错误码
     */
    private String resultCode;

    /**
     * 错误描述
     */
    private String resultMsg;

    CommonEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
